/*=============================================================================
  NULL_System.cpp : NULL device specific implementation and extensions handling.
  Copyright (c) 2001 Crytek Studios. All Rights Reserved.

  Revision history:
    * Created by Honitch Andrey

=============================================================================*/

#include "StdAfx.h"
#include "NULL_Renderer.h"


bool CNULLRenderer::SetGammaDelta(const float fGamma)
{
  m_fDeltaGamma = fGamma;
  return true;
}

int CNULLRenderer::EnumDisplayFormats(SDispFormat* Formats)
{
  return 0;
}

bool CNULLRenderer::ChangeResolution(int nNewWidth, int nNewHeight, int nNewColDepth, int nNewRefreshHZ, bool bFullScreen, bool bForce)
{
  return false;
}

WIN_HWND CNULLRenderer::Init(int x,int y,int width,int height,unsigned int cbpp, int zbpp, int sbits, bool fullscreen,WIN_HINSTANCE hinst, WIN_HWND Glhwnd, bool bReInit, const SCustomRenderInitArgs* pCustomArgs, bool bShaderCacheGen)
{
  //=======================================
  // Add init code here
  //=======================================

  SetWireframeMode(R_SOLID_MODE);

  m_width = width;
  m_height = height;
  m_Features |= RFT_HW_NVIDIA;
  
  iLog->Log("Init Shaders\n");

  gRenDev->m_cEF.mfInit();
  EF_Init();

#if defined(LINUX) || defined(XENON) || defined(_PS3) || defined(CAFE)
	return (WIN_HWND)this;//it just get checked against NULL anyway
#else
  return (WIN_HWND)GetDesktopWindow();
#endif
}


bool CNULLRenderer::SetCurrentContext(WIN_HWND hWnd)
{
  return true;
}

bool CNULLRenderer::CreateContext(WIN_HWND hWnd, bool bAllowMSAA)
{
  return true;
}

bool CNULLRenderer::DeleteContext(WIN_HWND hWnd)
{
  return true;
}

void CNULLRenderer::MakeMainContextActive()
{
}

void CNULLRenderer::ShutDown(bool bReInit)
{
  FreeResources(FRR_ALL);
  FX_PipelineShutdown();
}

void CNULLRenderer::ShutDownFast()
{
  FX_PipelineShutdown();
}

